<%@ page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>

<html>
    <head>
    <script>
    	if(document.domain.toString().indexOf("qronet.co.kr") != -1)
			document.domain = 'qronet.co.kr'; 
	</script>
    <%@ include file="/WEB-INF/views/include/common.jsp" %>
    
	<meta name="AUTHOR" content="QroTech Co., Ltd." />
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="CACHE-CONTROL" content="NO-CACHE">
	<meta http-equiv="PRAGMA" content="NO-CACHE">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<link href="/resources/css/Qronet_display.css" rel="stylesheet" media="screen" />
    <title>sub4_1</title>
    </head>
    <body>
    	<div class="content" id="menu4-content1">
    			<div class="sub4_header"><img src="${imgUrl}/QronetHomeImages/sub4-1-header.png"></div>
    			<div class="sub4_1_content">
    				<div class="table_wrapper">
    					<table class="sub4_table" cellpadding="0" cellspacing="0">
    					<thead>
    						<tr>
    							<th width="70px">제목</th>
    							<th width="470px" class="left_align" style="font-weight: normal;"><c:out value="${boardView.title}" /></th>
    							<th width="40px">등록일</th>
    							<th width="80px" style="font-weight: normal;padding-right:20px;"><fmt:formatDate value="${boardView.regiTime}" pattern="yyyy-MM-dd"/></th>
    						</tr>
    					</thead>
    					<tbody>
    						<tr>
    							<td colspan="4">
    								<div class="sub4_para">
    									<c:out value="${boardView.contents}" escapeXml="No"/>
    								</div>
    							</td>
    						</tr>
    						
    						<tr>
    							<td colspan="4" class="left_align"><a onClick="gotoView(1)"><span class="next_page"><img src="${imgUrl}/QronetHomeImages/after_arrow.png"> 다음글</span>
    							<span class="left_align"><c:out value="${nextBoardView.title}" /><input type="hidden" name="nextTextID" id="nextTextID" value="<c:out value="${nextBoardView.textID}" />"></span></a>
    							</td>
    						</tr>
    						<tr>
    							<td colspan="4" class="left_align"><a onClick="gotoView(2)"><span class="next_page"><img src="${imgUrl}/QronetHomeImages/before_arrow.png"> 이전글</span>
    							<span class="left_align"><c:out value="${prevBoardView.title}" /><input type="hidden" name="prevTextID" id="prevTextID" value="<c:out value="${prevBoardView.textID}" />"></span></a>
    							</td>
    						</tr>
    					</tbody>
    				</table>
    				<div class="button"><a onClick="gotoList();"><img src="${imgUrl}/QronetHomeImages/sub4_1_2_button.png"></a></div>
    			</div>
    		</div>	
    		<div class="sub4_footer">COPYRIGHT(C) QROTECH ALL RIGHTS RESERVED.</div>
    	</div><!--sub4-1 end-->
    	<form name="theForm" id="theForm" action="" method="post" style="display:none;">
    		<input type="hidden" name="textID" id="textID">
    	</form>
    	<script language="javascript">
    		function gotoView(type) {
    			if (type == 1) {
    				$("#textID").val($("#nextTextID").val());
    			} else {
    				$("#textID").val($("#prevTextID").val());
    			}
    			
    			$("#theForm").attr("action", "/homepage/noticeView");
    			$("#theForm").submit();
    		}
    		
    		function gotoList() {
    			location.href= "/homepage/noticeListMain";
    		}
    	</script>
    </body>
</html>